from django.db import models

# Create your models here.


class Category(models.Model):
	caption = models.CharField(max_length=16)
	def __str__(self):
		return self.caption

class ArticleType(models.Model):
	'''类型'''
	caption = models.CharField(max_length=16)
	def __str__(self):
		return self.caption

class Article(models.Model):
	title = models.CharField(max_length=32)
	content = models.CharField(max_length=256)
	category = models.ForeignKey(Category)
	article_type = models.ForeignKey(ArticleType)
